﻿using sixgod.Common.Model;
using sixgod.Dtos.System;
using sixgod.Dtos.System.Search;
using sixgod.Model.System.Menu;
using SqlSugar;

namespace sixgod.Service.Dictionary;

public interface IMenuService : ISimpleClient<SystemMenu>
{
    void Init();

    /// <summary>
    /// 根据用户ID获取菜单
    /// </summary>
    /// <param name="loginUid"></param>
    /// <returns></returns>
    Task<List<MenuDto>> GetUserMenu(string loginUid);

    Task<List<SystemMenu>> GetAllList();

    /// <summary>
    /// 获取子菜单
    /// </summary>
    /// <param name="code"></param>
    /// <returns></returns>
    Task<List<MenuDto>> GetChildrenMenu(string code);

    /// <summary>
    /// 分页数据
    /// </summary>
    /// <param name="search"></param>
    /// <returns></returns>
    Task<PageResponseResult<MenuDto>> GetPageList(MenuPageSearch search);

    /// <summary>
    /// 带层级的所有列表
    /// </summary>
    /// <returns></returns>
    Task<List<MenuDto>> GetAllListForSelect();

    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="data"></param>
    /// <returns></returns>
    Task<bool> Save(SystemMenu data);

    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="Id"></param>
    /// <returns></returns>
    Task<int> Delete(string Id);
}